package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

public enum DuiZhangType {
	duiZhangT("通道有本地无","1"), 
	duiZhangB("本地有通道无","2"),
	duiZhangC("通道有本地撤销","3"), 
	duiZhangZ("通道有本地冲正失败","4"),
	duiZhangBC("通道有本地冲正","5");
	
	 
	 
	private String code;
	private String name;

	private DuiZhangType( String name,String code) {
		this.code = code;
		this.name = name;
		
	}


	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static DuiZhangType valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (DuiZhangType ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

}
